package com.spirngcloud.alibabasentinelratelimiting.controller.mq.util;

import org.springframework.amqp.rabbit.annotation.Queue;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * @version V1.0
 * @Author 宋聚智
 * @Date 2019/10/24 9:57
 * @description
 * @Modify By：
 * @ModifyTime： 2019/10/24
 * @Modify marker：
 **/
@Component
public class FanoutDemoMessageListenr {
    @RabbitListener(queues="My-First-Queue")
    public void firstConsumer(String context){
        System.out.println("我是：my-first-queue"+context);
    }

    @RabbitListener(queues="My-Two-Queue")
    public void twoConsumer(Integer num){
        System.out.println("我是：my-two-queue："+num);
    }

    @RabbitListener(queues="My-Three-Queue")
    public void threeConsumer(){
        System.out.println("我是：My-Three-Queue");
    }
}
